home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / geos-archive / GEOS-D64 / GEOS - Geos #005 (19xx)(-).d64 / mouseup3.0.arc / A / MOUSEUP (.txt)
GEOS ConVerT  |  2019-04-13  |  5KB  |  110 lines

  1. a/MouseUp
  2. SEQ formatted GEOS file V1.0
  3. 802 / No Paging
  4. 64 L2R2L 1351
  5.  Paging
  6. GRAB ICON
  7. PrintDrvrPatcher
  8.     1526 FIX
  9. CONVERT3.0.64
  10. COPE Source V1.1
  11. COPE Editor V1.3
  12. GeoCOPE assembly code for the boot-up file "MouseUp".
  13. @(@\@
  14. @/AtA
  15.  geoCOPE Assembler Source Code 
  16. ; Auto-executing Preferences & input-driver loader.
  17. ; v1.1 -- Made prg. to boot default input driver.  - Terry R. Mullett 87-3-19
  18. ; v2.0 -- Added preferences loader/setter.  - TRM 87-4-26
  19. ; v2.1 -- Changed order to set prefs., first.  Also,  - Greg King 88-11-29
  20. ;        added code to init. driver so that self-adapters will work.
  21. ; v3.0 -- Added code to load 128 input driver if GEOS128.  - GDK 88-12-4
  22. ;      Normally, at boot-up time, GEOS doesn't load your input driver and
  23. ; preferences until after the deskTop has run.  However, GEOS (v1.3 and later)
  24. ; runs auto-executing programs BEFORE it runs the deskTop!  Therefore, those
  25. ; programs can't use "mouse input" -- unless they have "outside" help! 
  26. ; "MouseUp" is an "auto-execute" file which will set up your preferences and
  27. ; default input driver.  If you copy it onto your boot disk "before" any
  28. ; auto-exec files that need mouse input, then you'll be able to control those
  29. ; programs.  MouseUp doesn't need to be "in front of" auto-execs. that don't use
  30. ; the driver (CONFIGURE, for example).
  31.  .Dname MouseUp
  32.  .Type AUTO_EXEC ; Auto-Boot Application
  33. ; +++ info block +++
  34.  .Name "MouseUp     v3.0",0,0,0,SET128_80COL|SET128_40COL
  35.  .Author Greg King
  36.  .Icon
  37.   $ff,$ff,$ff,$80,$00,$01,$9e,$00,$79,$bf,$00,$fd,$ff,$81,$ff,$ff
  38.   $81,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$81,$ff,$bf,$db,$fd,$9f,$db
  39.   $f9,$86,$db,$61,$8f,$db,$f1,$8f,$81,$f1,$8f,$ff,$f1,$87,$ff,$e1
  40.   $83,$db,$c1,$81,$ff,$81,$80,$7e,$01,$80,$00,$01,$ff,$ff,$ff
  41. ; descriptive text:
  42. ; .Info  Installs user preferences and input driver
  43. ; .Info  for auto-exec. files without that capability.
  44. ; My macro-instructions are different from Berkeley's:  "Load" puts
  45. ; immediate values into CPU registers, "Store" puts them into memory,
  46. ; and "Move" puts the contents of memory into other memory.
  47. ; "B" and "W" mean Byte and Word data sizes.
  48. ; "bnz" is a branch-on-not-zero synonym for "bne."
  49.  .Include Macroes
  50.  .Include geoSyms
  51. ; +++ program code +++
  52.  .Start $0800
  53. mouseup jsr NewDisk ; (Just in case it might be needed.)
  54.  StoreB r0L : SET_LD_AT_ADDR
  55.  StoreW r6 : prefName
  56.  StoreW r7 : prefImage ; Load preferences file into buffer.
  57.  jsr GetFile
  58.  txa ; Did user make a file?
  59.  bnz NoPrefs ; No, don't change defaults.
  60.  MoveB maxMouseSpeed : prefMaxSpeed ; Set joystick behavior.
  61.  MoveB minMouseSpeed : prefMinSpeed
  62.  MoveB mouseAcceleration : prefAcceleration
  63.  lda prefForeColor ; Set screen colors.
  64.  ora prefBackColor
  65.  sta screenColors
  66.  sta r2L
  67.  StoreW r0 : 25*40
  68.  StoreW r1 : colorMatrix
  69.  jsr FillRam ; Color screen, ...
  70.  jsr InitForIO ; (Reach for VIC-II)
  71.  MoveB extclr : prefBorderColor ; ... border,
  72.  MoveB mob0clr : prefMouseColor ; and mouse sprite.
  73.  jsr DoneWithIO
  74.  jsr i_MoveData ; Set that sprite's look.
  75.  .Word prefMouseShape, mousePicData, 21*3
  76. NoPrefs StoreW r6 : fileName
  77.  ZeroW r10 ; Don't bother with permanent name.
  78.  lda #INPUT_64 ; Assume, at first, it's GEOS64.
  79.  bit c128Flag
  80.  bpl Is64
  81.  lda #INPUT_128 ; No, it's GEOS128.
  82. Is64 sta r7L
  83.  StoreB r7H : 1 ; Need only one filename.
  84.  jsr FindFTypes ; Find out what the default input driver is called.
  85.  lda r7H ; (Zero if file found, one if not.)
  86.  bnz NoInput
  87.  StoreB r0L : NULL
  88.  StoreW r6 : fileName
  89.  jsr GetFile ; Load that driver.
  90.  bnz NoInput
  91.  jsr InitMouse ; Initiate it.
  92.  clc ; (Don't move mouse-cursor)
  93.  jsr StartMouseMode
  94.  jsr UpdateMouse ; Set "old" device position within driver.
  95. NoInput jmp EnterDeskTop ; Go to next auto-exec.
  96. prefName .Byte "Preferences", EOS ; (That file can't be renamed.)
  97. ; Preferences file is loaded into this buffer.
  98. prefImage
  99. prefMaxSpeed .Block 1 ; Maximun allowed mouse-cursor speed.
  100. prefMinSpeed .Block 1 ; Minimum allowed speed.
  101. prefAcceleration .Block 1 ; Desired speed change.
  102. prefForeColor .Block 1 ; Upper nibble.
  103. prefBackColor .Block 1 ; Lower nibble.
  104. prefMouseColor .Block 1
  105. prefMouseShape .Block 21*3
  106. prefBorderColor .Block 1
  107. fileName .Block 16+1
  108.  .Block 0 ; Show highest-used address, on assembly listing.
  109.  .PC prefImage ; Don't put space for variables into program-file!
  110.